package com.spring5.study.pojo;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Component;

//等价于<bean id= "user" class= "com.kuang.pojo.User"/>
// @Component  组件
@Component
public class User {

    //相当于<property name= "name" value= "kuangshen"/>
    //@Value("WeaWing")
    public String name;

    @Value("WeaWing")
    public void setName(String name) {
        this.name = name;
    }
}
